package com.cloud.class04.test;

public interface Animal {
    void eat();
}

class Test1 {
    public static void main(String[] args) {
        Animal a = new Animal() {
            @Override
            public void eat() {
                System.out.println("吃");
            }
        };
        a.eat();

        System.out.println("------------------");
        Animal aa = () ->
                System.out.println("吃");


    }

}
